<!--  -->
<template>
  <div class="student">
    <h1>学生名字： {{ name }}</h1>
    <h1>年龄： {{ age }}</h1>
    <h3>当前求和为：{{ number }}</h3>
    <button @click="sendMessage">sendMessage</button>
  </div>
</template>

<script>
export default {
  name: "Student",
  data() {
    return {
      name: "Tom",
      age: 18,
      number: 0,
    };
  },
  methods: {
    sendMessage() {
      console.log("sendMessage...")
      this.$bus.$emit("hello", 666)
    },
  },
};
</script>

<style lang="css">
.student {
  background-color: pink;
  padding: 5px;
  margin-top: 10px;
}
</style>

